\hypertarget{front__panel_2computer__interface_8h}{
\section{front\_\-panel/computer\_\-interface.h File Reference}
\label{front__panel_2computer__interface_8h}\index{front\_\-panel/computer\_\-interface.h@{front\_\-panel/computer\_\-interface.h}}
}
Interface towards the computer.  


\subsection*{Functions}
\begin{CompactItemize}
\item 
\hypertarget{front__panel_2computer__interface_8h_2daa9000653d78a4e7ec343234048b9e}{
void \hyperlink{front__panel_2computer__interface_8h_2daa9000653d78a4e7ec343234048b9e}{computer\_\-interface\_\-init} (void)}
\label{front__panel_2computer__interface_8h_2daa9000653d78a4e7ec343234048b9e}

\begin{CompactList}\small\item\em Initialize the communication interface towards the computer. Will initialize buffers etc. \item\end{CompactList}\item 
\hypertarget{front__panel_2computer__interface_8h_4df89fd1efe2e5b7ec86f054d5833370}{
void \hyperlink{front__panel_2computer__interface_8h_4df89fd1efe2e5b7ec86f054d5833370}{computer\_\-interface\_\-send\_\-data} (void)}
\label{front__panel_2computer__interface_8h_4df89fd1efe2e5b7ec86f054d5833370}

\begin{CompactList}\small\item\em Function which will send data from the tx\_\-buffer to the uart. \item\end{CompactList}\item 
void \hyperlink{front__panel_2computer__interface_8h_02eb4c158dd37c93a92a27804bf90e43}{computer\_\-interface\_\-parse\_\-data} (void)
\begin{CompactList}\small\item\em Function which will parse the data in the rx\_\-buffer and process the command. \item\end{CompactList}\item 
\hypertarget{front__panel_2computer__interface_8h_ff35dbb7772f15bcaebcde0aa10d81c3}{
void \hyperlink{front__panel_2computer__interface_8h_ff35dbb7772f15bcaebcde0aa10d81c3}{computer\_\-interface\_\-activate\_\-setup} (void)}
\label{front__panel_2computer__interface_8h_ff35dbb7772f15bcaebcde0aa10d81c3}

\begin{CompactList}\small\item\em Activate the setup mode of the device. Will mainly just create various buffers needed to store settings. \item\end{CompactList}\item 
\hypertarget{front__panel_2computer__interface_8h_5176e3b7186a6f2a0daa68b0c08208b5}{
void \hyperlink{front__panel_2computer__interface_8h_5176e3b7186a6f2a0daa68b0c08208b5}{computer\_\-interface\_\-deactivate\_\-setup} (void)}
\label{front__panel_2computer__interface_8h_5176e3b7186a6f2a0daa68b0c08208b5}

\begin{CompactList}\small\item\em Function which will deactivate the computer setup mode, this will clear up memory space of the allocated buffers in the \hyperlink{front__panel_2computer__interface_8c_ff35dbb7772f15bcaebcde0aa10d81c3}{computer\_\-interface\_\-activate\_\-setup()} function. \item\end{CompactList}\item 
unsigned char \hyperlink{front__panel_2computer__interface_8h_8eb6680447ca0e3ed88c26ac3ede2fc1}{computer\_\-interface\_\-is\_\-active} (void)
\begin{CompactList}\small\item\em Retrieve the status if the computer interface is active. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interface towards the computer. 

\begin{Desc}
\item[Author:]Mikael Larsmark, SM2WMV \end{Desc}
\begin{Desc}
\item[Date:]2010-01-25 

\begin{Code}\begin{verbatim} #include "front_panel/computer_interface.h" 
\end{verbatim}
\end{Code}

 \end{Desc}


Definition in file \hyperlink{front__panel_2computer__interface_8h-source}{computer\_\-interface.h}.

\subsection{Function Documentation}
\hypertarget{front__panel_2computer__interface_8h_8eb6680447ca0e3ed88c26ac3ede2fc1}{
\index{front\_\-panel/computer\_\-interface.h@{front\_\-panel/computer\_\-interface.h}!computer\_\-interface\_\-is\_\-active@{computer\_\-interface\_\-is\_\-active}}
\index{computer\_\-interface\_\-is\_\-active@{computer\_\-interface\_\-is\_\-active}!front_panel/computer_interface.h@{front\_\-panel/computer\_\-interface.h}}
\subsubsection[{computer\_\-interface\_\-is\_\-active}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char computer\_\-interface\_\-is\_\-active (void)}}
\label{front__panel_2computer__interface_8h_8eb6680447ca0e3ed88c26ac3ede2fc1}


Retrieve the status if the computer interface is active. 

\begin{Desc}
\item[Returns:]1 if it is active, 0 otherwise \end{Desc}


Definition at line 686 of file computer\_\-interface.c.

References COMPUTER\_\-COMM\_\-FLAG\_\-SETUP\_\-MODE, and computer\_\-comm\_\-struct::flags.

Referenced by event\_\-internal\_\-comm\_\-parse\_\-message(), ISR(), and main().\hypertarget{front__panel_2computer__interface_8h_02eb4c158dd37c93a92a27804bf90e43}{
\index{front\_\-panel/computer\_\-interface.h@{front\_\-panel/computer\_\-interface.h}!computer\_\-interface\_\-parse\_\-data@{computer\_\-interface\_\-parse\_\-data}}
\index{computer\_\-interface\_\-parse\_\-data@{computer\_\-interface\_\-parse\_\-data}!front_panel/computer_interface.h@{front\_\-panel/computer\_\-interface.h}}
\subsubsection[{computer\_\-interface\_\-parse\_\-data}]{\setlength{\rightskip}{0pt plus 5cm}void computer\_\-interface\_\-parse\_\-data (void)}}
\label{front__panel_2computer__interface_8h_02eb4c158dd37c93a92a27804bf90e43}


Function which will parse the data in the rx\_\-buffer and process the command. 



Bit 0 = Footswitch Bit 1 = Radio sense lower floor Bit 2 = Radio sense upper floor Bit 3 = Computer RTS Bit 4 = Inverted radio sense Bit 5 = Inverted Computer RTS Bit 6 = Inhibit polarity (0=active low, 1=active high)

unsigned char ptt\_\-input;

Definition at line 304 of file computer\_\-interface.c.